import Vue from 'vue'
import Router from 'vue-router'
import MessageAdd from '../components/MessageAdd'
import MessageList from '../components/MessageList'

Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [
        // {
        //   path: '/',
        //   name: 'HelloWorld',
        //   component: HelloWorld
        // },
        {
            path: '/list',
            component: MessageList
        },
        {
            path: '/add',
            component: MessageAdd
        },
        {
            path:'*',
            redirect:'/list'
        }
    ]
})
